<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: lxf
  Date: 2016/6/28
  Time: 15:56
  To change this template use File | Settings | File Templates.
--%>
<html>
<head>
    <title>角色管理</title>
    <style>
        .priLabel span {
            padding: 5px 10px;
        }
    </style>
    <script>
        function backup() {
            window.location.href = "/role/list";
        }
    </script>
</head>
<body>
<div>
    <form:form commandName="roleDTO" action="/role/form" method="post">
        <form:hidden path="guid"/>
        <table class="table table-hover">
            <tr>
                <td>角色名称:</td>
                <td><form:input path="name"/></td>
            </tr>
            <tr>
                <td>角色权限:</td>
                <td class="priLabel">
                    <form:checkboxes path="privileges" items="${privilegesEnum}"/>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input type="submit" class="btn btn-primary" value="保存"/>
                    <input type="button" class="btn btn-info" value="返回" onclick="backup()"/>
                </td>
            </tr>
        </table>
    </form:form>
</div>
</body>
</html>
